import {instance} from "@/utils/request.js";
export const addNewsApi = (data) => {
    return instance({
        url: '/news/add',
        method: "POST",
        headers: {
            'Content-Type': 'application/json'
        },
        data
    })
}


export const getNewsApi=()=>{
    return instance({
        url: '/news/get',
        method: "GET"
    })
}

export const getNewsDetailApi=(newsId)=>{
    return instance({
        url: '/news/getNewsDetail',
        method: "GET",
        params:{
            newsId
        }
    })
}


export const getSideBarApi=()=>{
    return instance({
        url: '/library/getSideBar',
        method: "GET"
    })
}


export const getClassItemInfoApi=(itemName)=>{
    return instance({
        url: '/library/getClassItemInfo',
        method: "GET",
        params:{
            itemName
        }
    })
}
